<?php
namespace app\admin\validate;

use think\Validate;

class LetterValidate extends Validate
{
    protected $rule = [
        "title" => 'require',
        'content' => 'require',
    ];

    protected $message = [
        'title.require' => '站内信标题必须填写',
        'content.require' => '站内信内容必须填写',
        "id.require" => "缺少id",
    ];

    protected $scene = [
        'add' => ['title','content'],
        'edit' => ['title','id','content'],
        'del'=>['id'],
    ];

}